<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
  <title>Document</title>
  
  <style>
    * {
      margin: 0;
      padding: 0;

    }
    div {
      width: 50vw;
      height: 6.4vw;
      background-color: blue;
      font-size: 1.53vw;
      border: 1px solid red;
    }
  </style>
</head>
<body>
  <div>法大师傅十分士大夫</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/mobile-detect@1.4.5/mobile-detect.min.js"></script>
  <script>
    let md = new MobileDetect(window.navigator.userAgent)
    console.log(window.navigator.userAgent)
    console.log( md.mobile() );          // 'Sony'
    console.log( md.phone() );           // 'Sony'
    console.log( md.tablet() );          // null
    console.log( md.userAgent() );       // 'Safari'
    console.log( md.os() );              // 'AndroidOS'
    console.log( md.is('iPhone') );      // false
    console.log( md.is('bot') );         // false
    console.log( md.version('Webkit') );         // 534.3
    console.log( md.versionStr('Build') );       // '4.1.A.0.562'
    console.log( md.match('playstation|xbox') ); // false
  </script>
  
</html>